package ProjectYudisium;

import java.awt.*;
import java.awt.event.*;
import java.io.FileNotFoundException;
import java.io.IOException;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;

public class PanelPeriksaYudisium extends JPanel {

    private JLabel jdl, search, label;
    private JComboBox comBox;
    private JTextField cari;
    private JButton mencari, change, close;
    private JTextArea text;

    public PanelPeriksaYudisium() {
        Yudisium yudi = new Yudisium();
        setLayout(null);
        setVisible(true);
        jdl = new JLabel("*** DATA INPUTAN PENDAFATARAN YUDISIUM ***");
        jdl.setFont(new Font("Harrington", 1, 20));
        jdl.setBackground(Color.BLACK);
        jdl.setBounds(100, 10, 600, 40);
        add(jdl);
        
//        Sekretariat.bacaYudisium();
        
        label = new JLabel("NIM");
        label.setFont(new Font("Harrington", 1, 12));
        label.setBackground(Color.BLACK);
        label.setBounds(25, 50, 55, 40);
        add(label);
        text = new JTextArea();
        text.setText(Sekretariat.bacaNIMYudisium());
        text.setBounds(10, 100, 70, 220);
        text.setEditable(false);
        add(text);
        label = new JLabel("NAMA");
        label.setFont(new Font("Harrington", 1, 12));
        label.setBackground(Color.BLACK);
        label.setBounds(95, 50, 190, 40);
        add(label);
        text = new JTextArea();
        text.setText(Sekretariat.bacaNamaYudisium());
        text.setBounds(90, 100, 190, 220);
        text.setEditable(false);
        add(text);
        label = new JLabel("PRODI");
        label.setFont(new Font("Harrington", 1, 12));
        label.setBackground(Color.BLACK);
        label.setBounds(295, 50, 100, 40);
        add(label);
        text = new JTextArea();
        text.setText(Sekretariat.bacaProdiYudisium());
        text.setBounds(290, 100, 100, 220);
        text.setEditable(false);
        add(text);
        label = new JLabel("FAKULTAS");
        label.setFont(new Font("Harrington", 1, 12));
        label.setBackground(Color.BLACK);
        label.setBounds(405, 50, 100, 40);
        add(label);
        text = new JTextArea();
        text.setText(Sekretariat.bacaFakultasYudisium());
        text.setBounds(400, 100, 100, 220);
        text.setEditable(false);
        add(text);
        label = new JLabel("PERIODE");
        label.setFont(new Font("Harrington", 1, 12));
        label.setBackground(Color.BLACK);
        label.setBounds(515, 50, 100, 40);
        add(label);
        text = new JTextArea();
        text.setText(Sekretariat.bacaPeriodeYudisium());
        text.setBounds(510, 100, 90, 220);
        text.setEditable(false);
        add(text);
        label = new JLabel("FILE");
        label.setFont(new Font("Harrington", 1, 12));
        label.setBackground(Color.BLACK);
        label.setBounds(625, 50, 50, 40);
        add(label);
        text = new JTextArea();
        text.setText(null);
        text.setBounds(610, 100, 65, 220);
        text.setEditable(false);
        add(text);
        
//                JTable tabel = new JTable(new Object[2][2], 
//                        new String[]{"Program Studi","Nomor HP","Periode Yudisium",
//                        "Fakultas","DaftarNilai","NaskahTA","Peminjaman Lab",
//                        "Peminjaman dari Dosen","Laporan KP","Surat KKN/KP","File Surat Pinjaman"});
//                this.add(tabel);
//                PanelPeriksaYudisium pnlPeriksa = new PanelPeriksaYudisium();
        search = new JLabel("Search Pendaftar");
        search.setFont(new Font("Harrington", 1, 16));
        search.setBackground(Color.BLACK);
        search.setBounds(50, 350, 200, 40);
        add(search);

        String berdasarkan[] = {"Periode Yudisium","NIM Pendaftar"};
        comBox = new JComboBox(berdasarkan);
        comBox.setBounds(200, 350, 125, 35);
        add(comBox);
        cari = new JTextField("");
        cari.setBounds(350, 350,100,35);
        cari.setFont(new Font("Times New Roman", 1, 20));
        add(cari);

        mencari = new JButton("SEARCH");
        mencari.setFont(new Font("Times New Roman", 1, 14));
        mencari.setBounds(330, 410, 90, 35);
        add(mencari);
        mencari.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
//                if () {
//                    
//                }
            }
        });
        change = new JButton("CHANGE");
        change.setFont(new Font("Times New Roman", 1, 14));
        change.setBounds(430, 410,100, 35);
        add(change);
        change.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                
            }
        });
        close = new JButton("CLOSE");
        close.setFont(new Font("Times New Roman", 1, 14));
        close.setBounds(540, 410, 90, 35);
        add(close);
        close.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                FrameUtamaSekretariat fSekre = new FrameUtamaSekretariat();
                fSekre.setVisible(true);
                setVisible(false);
            }
        });
    }
    
    public void tabelCekIdentitas(){
        
    }
    
    public void tabelCekUnggahan(){
        
    }
}
